import requests
import re
headers = {
    'Host': 'www.walmart.com',
    'Connection': 'keep-alive',
    'Cache-Control': 'max-age=0',
    'sec-ch-ua': '"Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"',
    'sec-ch-ua-mobile': '?0',
    'Upgrade-Insecure-Requests': '1',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
    'Service-Worker-Navigation-Preload': 'true',
    'Sec-Fetch-Site': 'same-origin',
    'Sec-Fetch-Mode': 'navigate',
    'Sec-Fetch-User': '?1',
    'Sec-Fetch-Dest': 'document',
    'Accept-Encoding': 'gzip, deflate, br',
    'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
    'Cookie': 'AID=wmlspartner%253D0%253Areflectorid%253D0000000000000000000000%253Alastupd%253D1637050244515; ACID=e57a8b4c-df53-4682-85a9-a0f6cf417ed1; hasACID=true; locDataV3=eyJpbnRlbnQiOiJTSElQUElORyIsInBpY2t1cCI6W3siYnVJZCI6IjAiLCJub2RlSWQiOiIzMDgxIiwiZGlzcGxheU5hbWUiOiJTYWNyYW1lbnRvIFN1cGVyY2VudGVyIiwibm9kZVR5cGUiOiJTVE9SRSIsImFkZHJlc3MiOnsicG9zdGFsQ29kZSI6Ijk1ODI5IiwiYWRkcmVzc0xpbmUxIjoiODkxNSBHZXJiZXIgUm9hZCIsImNpdHkiOiJTYWNyYW1lbnRvIiwic3RhdGUiOiJDQSIsImNvdW50cnkiOiJVUyIsInBvc3RhbENvZGU5IjoiOTU4MjktMDAwMCJ9LCJnZW9Qb2ludCI6eyJsYXRpdHVkZSI6MzguNDgyNjc3LCJsb25naXR1ZGUiOi0xMjEuMzY5MDI2fSwiaXNHbGFzc0VuYWJsZWQiOnRydWUs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mc; bstc=YeDTYcBVVJrmBJn6nfVFmc; mobileweb=0; xpa=CfaEu; exp-ck=CfaEu1; _pxhd=/31pu0tzO1ECcUVm0TNn55u-08C8rpNRCZvDOnL0MqLMAibINQJeQKaDDvcYPc1t4aVGFFOHJF2ht5J3fmevnA==:cmMqj7pGW6pBtipT-FCLoSRKW8QFZbs9jtK6utKFrbUui5K5oAfhXrjVRb0Gv436XRrw0DmPDSSvuxbDsDiF5CJo-n81taZQaeSbCSP0gNI=; TBV=7; adblocked=false; pxcts=bbc3ed41-46b4-11ec-8697-fdbb46d83dd9; _pxvid=b2839e3b-46b4-11ec-a6e3-585a4b527450; ak_bmsc=8AABA27234D5386498DC3DA580A8A827~000000000000000000000000000000~YAAQDtrIF1iSSw99AQAAaZ/MJw2QCZ7NqEcAk4OJmEFCvIipXAXmk7y7iPC0L1lsWk26hecPTR2SEHacE+1LXGJ7rfnSCLIXHhT+2z+yeoJZF1krANdZEJVfxc9a8TjPMmLkCZscgR2z9s8qTYJkeLy6lxxUlD2lpiNQGJ9KCtTzZUXZBN+/2HbUBPHFLqlTjklgJ28KpzDsnzxG7owlkGObkXsPSNaTv2AGmmGBqoitQOzgr/OVE6kiUT2Qpmxlm6AfzWdMqXqYD0I8Dq1a3I3TkQasvK4TLEeBmLAunBjVD5sW4t4jC+5uf7iOj8vA3rD8t7/OmYBXxG6oSxFEKuGYK76ijpVNnWBiztTWJv+YjofLYls375KaeFGSwoixTnDjlB495XpZFxXDe9HoMNhbEKSLoeFDIf/CbpjwNB9bQNUxi1tEMl2n9rEO5C63LAis3U9NbMGfovsCePa6NUL8Jjcupa+En4AfTTA=; xpm=1%2B1637050244%2BYeDTYcBVVJrmBJn6nfVFmc~%2B0; tb_sw_supported=true; TB_SFOU-100=1; akavpau_p2=1637052508~id=91997cd6658b0a7566794db6c542e699; com.wm.reflector="reflectorid:0000000000000000000000@lastupd:1637051925000@firstcreate:1637050244515"; xptwg=2896669889:16834EFF5CF7C80:3B109BE:72E878EE:7F11AD15:5663913B:; TS01b0be75=01538efd7c81328bbb6eff6dd23390172201515443bf6c134fce8f64ddccda398e68c29d974899c599e59edd6d84c2e538cc979fe9; TS013ed49a=01538efd7c81328bbb6eff6dd23390172201515443bf6c134fce8f64ddccda398e68c29d974899c599e59edd6d84c2e538cc979fe9; bm_sv=A4501CB648113980B59BAAE1B05D5CC2~xkRIXprLft9ygnxDqx/fxqRsYOkmsY24QtxriB8SWuX63le4ZJuCCQc4ycCyIEoh5P1HcK9fGMia+XyzKMZX507WFn/A3hR/pyK14taRLCNkYiSd9lxXZB6qw3kXLZoxXLgO56HIv8bUXDfjRoWnVeziSypn4b/Qa+wAMGTjaz8=',

}
url='https://www.walmart.com/ip/Plus-Size-Fashion-Women-Long-Sleeve-Blazer-Suit-Ladies-Lapel-Cardigan-Casual-Slim-Fit-Jacket-Winter-Autumn-Stylish-Business-Coats-Collared-Outwear-To/740436483'
response=requests.get(url,headers=headers,verify=False).content.decode()
# print(response)
re_all=re.findall('<img loading="lazy" srcset=(.*)?odnHeight=80&amp;odnWidth=80&amp;odnBg=FFFFFF',response,re.S)[0]
# print(re_all)
src=re.findall('src="(.*?)\?',re_all)
print(src)
for i in range(len(src)):#图片链接获取
    print(src[i])



# ?odnHeight=80&amp;odnWidth=80&amp;odnBg=FFFFFF
